// 此为获取 应设置layui数据表格的高度，将上下表格设置为iframe高度的一半
var body_height = $(".file_iframe_left").height();
var layui_table_view__height = body_height / 2;

// 存放当前档号
var current_fileNumber = null;
// 存放增加与编辑前的表格数据
var INIT_DATA = {};


$(".search_btn").click(function(){
  let param = $("input[name='search']").val();
  if(!param){
    alert("检索参数不能为空！");
  }
  $(location).attr('href','/mangers?param='+param);
})
count();
log();
function count(){
  $.ajax({
    type: "GET",
    url: "/file/count",
    dataType: "json",
    success: function (json) {
      console.log(json);
      if (json.status === 200) {
        $("span[name='ele']").html(json.data.eleNumber);
        $("span[name='file']").html(json.data.fileNumber);
        $("span[name='case']").html(json.data.caseNumber);
      }
    }
  });
}
function log(){
  $.ajax({
    type: "GET",
    url: "/log/condit",
    data:{"pageNumber":1,"keywords":""},
    dataType: "json",
    async:false,
    success: function (json) {
      let rows = json.rows;
      length = json.total;
      let tbody = $(".notice_content ul");
      tbody.html("");
      let content = ``;
      let ser = 1;
      for(let row of rows){
        if(ser>=4)
          break;
        content+=`<li><span>`+row.content+`</span> <span class="notice_time">`+renderTime(row.createTime)+`</span></li>`;
        ser++;
      }
      tbody.html(content);
    }
  });
}